using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace BMC.ARSystem
{
	[ClassInterface, Guid("3e57f8be-a3fd-452b-b86e-a123bbf3dddc"), ProgId("BMC.ARSystem.EntryListFieldList")]
	public class EntryListFieldList : CollectionBase
	{
		public EntryListField this[int index]
		{
			get
			{
				return (EntryListField)base.get_List().get_Item(index);
			}
		}
		public EntryListFieldList()
		{
		}
		internal EntryListFieldList(object[] rawData, Server server)
		{
			for (int i = 0; i < rawData.Length; i++)
			{
				object obj = rawData[i];
				if (obj is Array && ((object[])obj).Length == 3)
				{
					object[] array = obj as object[];
					this.Add(new EntryListField(Convert.ToUInt32(array[0]), Convert.ToUInt32(array[1]), (string)array[2]));
				}
				else
				{
					this.Add(new EntryListField(Convert.ToUInt32(obj)));
				}
			}
		}
		internal static EntryListFieldList createInstance(object[] rawData, Server server)
		{
			return new EntryListFieldList(rawData, server);
		}
		public void AddField(int fieldId, int width, string separator)
		{
			base.get_List().Add(new EntryListField(Convert.ToUInt32(fieldId), Convert.ToUInt32(width), separator));
		}
		public void AddField(int fieldId)
		{
			this.AddField(fieldId, 15, " ");
		}
		public void Add(EntryListField action)
		{
			base.get_List().Add(action);
		}
		public void Remove(EntryListField action)
		{
			base.get_List().Remove(action);
		}
	}
}
